﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace HCFramework.Product.FrontEndControl
{
    public partial class SortProduct : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                UpdateState();

                foreach (ListItem item in DropDownList1.Items)
                {
                    item.Text = M.Common.GetLang(item.Text);
                }
            }
        }

        private void UpdateState()
        {
            string sort = Request.QueryString["sort"] + "";
            if (sort != "")
            {
                DropDownList1.SelectedValue = sort;
            }
        }
    }
}